package br.com.equus.service.impl;

import java.util.Date;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import br.com.arquitetura.DAO.UniversalDAO;
import br.com.equus.DAO.AgendaDAO;
import br.com.equus.entidade.AvaliacaoAnimal;
import br.com.equus.entidade.ItemEntrada;
import br.com.equus.entidade.ManejoAnimal;
import br.com.equus.entidade.MedicaoAnimal;
import br.com.equus.service.AgendaService;

@Service(value = "agendaService")
@Transactional(readOnly = true, rollbackFor = Exception.class, propagation = Propagation.SUPPORTS)
public class AgendaServiceImpl implements AgendaService {

	@Autowired(required = true)
	@Qualifier(value = "universalDAO")
	protected UniversalDAO dao;

	@Autowired(required = true)
	@Qualifier(value = "agendaDAO")
	protected AgendaDAO agendaDAO;

	@Override
	public List<ManejoAnimal> carregarListaManejo(Date dataInicial, Date dataFinal) throws Exception {
		return agendaDAO.carregarListaManejo(dataInicial, dataFinal);
	}

	@Override
	public List<AvaliacaoAnimal> carregarListaAvaliacao(Date start, Date end) throws Exception {
		return agendaDAO.carregarListaAvaliacao(start, end);
	}

	@Override
	public List<MedicaoAnimal> carregarListaMedicao(Date start, Date end) throws Exception {
		return agendaDAO.carregarListaMedicao(start, end);
	}

	@Override
	public List<ItemEntrada> carregarListaItem(Date start, Date end) {
		return agendaDAO.carregarListaItem(start, end);
	}

}
